package com.rc.pojo.po.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

// Auto generate by mybatis-flex, do not modify it.
public class FarmApplyTableDef extends TableDef {

    /**
     * 实体类。

 @author 27806
 @since 2024-06-18
     */
    public static final FarmApplyTableDef FARM_APPLY = new FarmApplyTableDef();

    public final QueryColumn ID = new QueryColumn(this, "id");

    public final QueryColumn NAME = new QueryColumn(this, "name");

    public final QueryColumn NOTES = new QueryColumn(this, "notes");

    public final QueryColumn PHONE = new QueryColumn(this, "phone");

    /**
     * 未通过原因
     */
    public final QueryColumn REASON = new QueryColumn(this, "reason");

    /**
     * 0未通过 1审核通过 2审核中
     */
    public final QueryColumn STATUS = new QueryColumn(this, "status");

    public final QueryColumn ADDRESS = new QueryColumn(this, "address");

    public final QueryColumn FARM_NAME = new QueryColumn(this, "farm_name");

    public final QueryColumn UPDATE_TIME = new QueryColumn(this, "update_time");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, NAME, NOTES, PHONE, REASON, STATUS, ADDRESS, FARM_NAME, UPDATE_TIME};

    public FarmApplyTableDef() {
        super("rc", "farm_apply");
    }

    private FarmApplyTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public FarmApplyTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new FarmApplyTableDef("rc", "farm_apply", alias));
    }

}
